package com.concurrent.chapter3.concurrent05;

import java.util.concurrent.Phaser;

public class ThreadB extends Thread {
	private Phaser phaser;
	public ThreadB(Phaser phaser) {
		super();
		this.phaser = phaser;
	}
	
	@Override
	public void run() {
		System.out.println(Thread.currentThread().getName() + " A1 begin " + System.currentTimeMillis());
		phaser.arriveAndAwaitAdvance();
		System.out.println(Thread.currentThread().getName() + " A1 end " + System.currentTimeMillis());
	}
}
